package com.qlogic.commons.platform.impls.lucene.model;

import java.io.Serializable;
import java.util.Collection;
import java.util.Vector;

public class RegistryRegion implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6464758231202469511L;
	
	private String indexer;
	private int action;
	
	private Vector documents;
	
	public String getIndexer() {
		return indexer;
	}
	
	public void setIndexer(String indexer) {
		this.indexer = indexer;
	}
	
	public int getAction() {
		return action;
	}
	
	public void setAction (int action) {
		this.action = action;
	}
	
	public Vector getDocuments () {
		return documents;
	}
	
	public void setDocuments (Vector documents) {
		this.documents = documents;
	}

	public void addDocument (DocumentWrapper documentWrapper) {
		if (documents == null) {
			documents = new Vector ();
		}
		documents.add (documentWrapper);
	}

	public void addDocuments (Collection documentWrappers) {
		if (documents == null) {
			documents = new Vector ();
		}
		documents.addAll (documentWrappers);
	}

	public void removeDocument (DocumentWrapper documentWrapper) {
		if (documents == null) {
			return;
		}
		documents.removeElement (documentWrapper);
	}

}
